var express = require('express');
//var model = require('../app/model/announcement-model');
var router = express.Router();

var controllerForUserInfo = require('../app/controller/userController');
var controllerForServiceInfo = require('../app/controller/serviceInfoController');
var controllerForDomain = require('../app/controller/domainController');
var controllerForServiceType = require('../app/controller/serviceTypeController');
/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('login', { title: 'IR4 Domain Integration Knowledge Base System' });
});
router.get('/Home', function(req, res, next) {
  res.render('homePage', { title: 'IR4 Domain Integration Knowledge Base System' });
});
router.post('/addUser',controllerForUserInfo.addUser);
router.post('/login',controllerForUserInfo.login);
router.get('/logout',controllerForUserInfo.logout);
router.post('/updateServiceInfo', controllerForServiceInfo.updateServiceInfo);
router.post('/searchServiceInfo', controllerForServiceInfo.getServiceInfo);
router.post('/updateDomain', controllerForDomain.updateDomain);
router.post('/getDomain', controllerForDomain.getDomain);
router.post('/getServiceType', controllerForServiceType.getServiceType);
router.post('/updateServiceType', controllerForServiceType.updateServiceType);


module.exports = router;
